package tsing.javase.thread.communication;

public class Main {
    public static void main(String[] args) {

        ComDemo comDemo = new ComDemo();

            new Thread(()->{
                for (int i = 0; i <10 ; i++) {
                    comDemo.printA(i);
                }

            },"A").start();
            new Thread(()->{
                for (int i = 0; i <10 ; i++) {
                    comDemo.printB(i);
                }

            },"B").start();

            new Thread(()->{
                for (int i = 0; i < 10; i++) {
                    comDemo.printC(i);
                }

            },"C").start();


    }
}
